from common.http_request import Request
from biz.support.urls import ServerUrl

class UserRequest:

    @classmethod
    def login(cls,username,password):
        data={
            'username':username,
            'passwd':password
        }
        req = Request(ServerUrl.login_url,data=data)
        return req.post()

    @classmethod
    def register(cls,username,pwd,cwpwd):
        data = {
            'username':username,
            'pwd':pwd,
            'cpwd':cwpwd
        }

        req = Request(ServerUrl.register_url,data=data)
        return req.post()



if __name__ == "__main__":
    pass
    # result = UserRequest.login('niuhanyang','aA123456')
    # print(result)
